package com.totem.order.api;

import com.totem.base.model.Result;
import com.totem.order.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.validation.Valid;

@Tag(name="ITOrderServiceApi", description="订单信息服务")
public interface ITOrderServiceApi {
    @Operation(summary="购买商品")
    @PostMapping("/order/goods")
    @ResponseBody
    Result<GoodsOrderVO> orderGoods(@RequestBody @Valid GoodsOrderVO vo);

    @Operation(summary="操作基金")
    @PostMapping("/order/fund")
    @ResponseBody
    Result<FundOrderVO> orderFund(@RequestBody @Valid FundOrderVO vo);

    @Operation(summary="充值")
    @PostMapping("/order/recharge")
    @ResponseBody
    Result<RechargeOrderVO> orderRecharge(@RequestBody @Valid RechargeOrderVO vo);

    @Operation(summary="认购")
    @PostMapping("/order/subscribe")
    @ResponseBody
    Result<SubscribeOrderVO> orderSubscribe(@RequestBody @Valid SubscribeOrderVO vo);

    @Operation(summary="提现")
    @PostMapping("/order/withdraw")
    @ResponseBody
    Result<WithdrawOrderVO> orderWithdraw(@RequestBody @Valid WithdrawOrderVO vo);

    @Operation(summary="提现手续费")
    @PostMapping("/order/withdrawCharge")
    @ResponseBody
    Result<WithdrawChargeVO> withdrawCharge(@RequestBody @Valid WithdrawChargeVO withdrawChargeVO);

    @Operation(summary="余额转化")
    @PostMapping("/order/conversion")
    @ResponseBody
    Result<ConversionOrderVO> orderConversion(@RequestBody @Valid ConversionOrderVO vo);

    @Operation(summary="余额转化手续费")
    @PostMapping("/order/conversionCharge")
    @ResponseBody
    Result<ConversionChargeVO> conversionCharge(@RequestBody @Valid ConversionChargeVO conversionChargeVO);

    @Operation(summary="取消订单")
    @PostMapping("/order/cancel")
    @ResponseBody
    Result<CancelOrderVO> cancelOrder(@RequestBody @Valid CancelOrderVO vo);

    @Operation(summary="删除订单")
    @PostMapping("/order/delete")
    @ResponseBody
    Result<DeleteOrderVO> deleteOrder(@RequestBody @Valid DeleteOrderVO vo);

}
